package com.quan.system.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 系统-菜单
 * </p>
 *
 * @author 杨浩泉
 * @since 2019-06-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_system_menu")
public class SystemMenu implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	/**
	 * PID
	 */
	private Long pid;

	/**
	 * 名称
	 */
	private String name;

	/**
	 * 方法
	 */
	private String method;

	/**
	 * URL
	 */
	private String url;

	/**
	 * 图标
	 */
	private String icon;

	/**
	 * 排序
	 */
	private Integer sort;

	/**
	 * 状态(0:禁用:,1:正常)
	 */
	private Boolean status;

	/**
	 * 创建时间
	 */
	private LocalDateTime ctime;

	/**
	 * 最后更新时间
	 */
	private LocalDateTime utime;

	@TableField(exist = false)
	public List<SystemMenu> children;

}
